﻿@{
    Layout = null;
   var dt = ViewBag.Data as System.Data.DataTable;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Edit</title>
    <link href="~/Scripts/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" />
    <link href="~/Scripts/ligerUI/skins/ligerui-icons.css" rel="stylesheet" />
    <link href="~/Scripts/ligerUI/skins/Gray/css/all.css" rel="stylesheet" />
    <link href="~/Content/css/common.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="~/Scripts/ligerUI/js/ligerui.all.js"></script>
    <script src="~/Scripts/common.js"></script>
    <style>
        .gridtable {
            width: 400px;
            margin: 0px;
        }

            .gridtable td {
                height: 30px;
                line-height: 30px;
            }
    </style>
</head>
<body>
    <div style="margin:10px 0px;">
        <table class="gridtable">
            <tr>
                <td style="text-align:right; width:100px;">
                    路径名称：
                </td>
                <td>
                    <input type="text" id="txtPathWayName" class="l-text" style="width:250px;" value="@(dt.Rows[0]["Name"])" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
           
            <tr>
                <td style="text-align:right; width:100px;">
                    排序：
                </td>
                <td>
                    <input type="text" id="txtParentId" style="width:250px;" value="@(dt.Rows[0]["Sort"])" />
                </td>
            </tr>           
            <tr>
                <td colspan="2" style="text-align:center;padding-top:10px;">
                    <input id="btnSubmit" type="button" value="确定" class="l-button" style="background: skyblue;" onclick="save()" />&nbsp;&nbsp;&nbsp;
                    <input id="btnReset" type="reset" value="重置" class="l-button" />
                </td>
            </tr>
            <tr></tr>
        </table>
        <input type="hidden" id="hdnId" value="@(dt.Rows[0]["Id"])" />
    </div>
    <script type="text/javascript">
        function save() {
            if ($("#txtPathWayName").val() == "")
            { $("#txtPathWayName").focus(); return;}
            var editurl = "../PathwayList/EditSubmit";
            $.post(editurl, {
                rnd: new Date().getMilliseconds(),
                pathwayName: $("#txtPathWayName").val(),
                Id: $("#hdnId").val()
            }, function (data, textStatus) {
                if (textStatus == "success") {
                    alert(data);
                }
            })
        }
    </script>
</body>
</html>
